package com.cyys.modules.generator.dao;

import com.cyys.common.mapper.CyysBaseMapper;
import com.cyys.modules.generator.model.GeneratorField;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface GeneratorFieldDao extends CyysBaseMapper<GeneratorField> {

    @Select("select `COLUMN_NAME`,`COLUMN_TYPE`,`ORDINAL_POSITION`,`COLUMN_COMMENT` from information_schema.COLUMNS where TABLE_SCHEMA = (select database()) and TABLE_NAME=#{tableName}")
    List<GeneratorField> listTableColumn(String tableName) ;

    void physicalDeleteByTableId(String tableId) ;

    List<GeneratorField> getByTableId(String tableId) ;

    List<String> listInputTypes(String tableId) ;

    List<String> listParamNames(String tableId) ;

    int getQueryNum(String id) ;
}
